package org.NooLab.itexx.storage.randomwords.iciql;

import com.iciql.Iciql.IQColumn;
import com.iciql.Iciql.IQIndex;
import com.iciql.Iciql.IQIndexes;
import com.iciql.Iciql.IQTable;


@IQTable
@IQIndexes({ @IQIndex({ "compoundlabel" }), @IQIndex({ "wordlabel" })}  )
             

public class Contexts {

	@IQColumn(primaryKey = true, autoIncrement =true)
	public Long id;
	
	@IQColumn
	public Long contextid;

	@IQColumn
	public int varianttype;

	@IQColumn
	public Long docid;      // where the context is to be found

	
	@IQColumn(length = 3,trim = true)
	public String language;   
	
	
	@IQColumn(length = 20,trim = true)
	public String version;   

	/**
	 * content types of the numerical vector: rgraph stats, props, parsed etc... 
	 * encoded by constants
	 */
	@IQColumn(length = 20,trim = true)
	public String vcontent;     

	
	@IQColumn
	public Integer entitytype;
	
	@IQColumn
	public Long entityid;
	
	@IQColumn(length = 50,trim = true)
	public String wordlabel;     // the word as string  

	@IQColumn(length = 80,trim = true)
	public String storlabel;     // the encoded reference to the SOM for renormalization  

	
	@IQColumn(length = 250,trim = true)
	public String compoundlabel; // concatenated word + stor 

	@IQColumn(length = 30,trim = true)
	public String contexttype;   // e.g. "random", "general", "lattice" etc... 
	
	
	@IQColumn
	public Integer contextparam; // reserved, not used yet   

	@IQColumn
	public Double  weight;       // the weight of the whole thing, the weight controls the amplitude 

	@IQColumn
	public Integer asymmetry;    // [-k +k] needs to be normalized across entries

	
	@IQColumn
	public Long createtime; 
	
	@IQColumn
	public Integer status;
	
	@IQColumn
	public Long idcindex ;         
	 
	@IQColumn
	public Long fpindex ;   
	 
	@IQColumn (length = 2500,trim = true)
	public String storindexes;
	
	@IQColumn (length = 40, trim = true)  
	public String storLabelGuid  ;
	 
	@IQColumn (length = 2500,trim = true)
	public String reserved_01 ;
	 
	@IQColumn
	public Integer frequency  ;
	
	@IQColumn
	public Double relfrequency  ;
	
	@IQColumn
	public Double distanceMean ;
	 
	@IQColumn
	public Double distanceStDev ;
	 
	@IQColumn
	public Integer groupsCount ;
	 
	@IQColumn
	public Double saliency ;

	@IQColumn (length = 2000,trim = true)  // 8 digits total+ 1 sep ~10 *150 1500
	public String randomcontext ;

	// ----------------------------------------------------
	public void clear() {
		 
		vcontent = "";     
		entitytype = -1;
		entityid = -1L;
		varianttype = -1;
		wordlabel="";      
		compoundlabel="";   
		docid = -1L;   
		createtime = -1L;
		status=-1;
		idcindex = -1L;         
		fpindex = -1L;  
		storindexes = "";
		storLabelGuid="";
		reserved_01 = "";
		frequency = -1 ;
		distanceMean = -1.0;
		distanceStDev = -1.0;
		groupsCount = -1;
		saliency = -1.0;
		randomcontext="" ; // a list of doubles [;..;..[]]
	}

	
		
}
	
